﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace KPIS.GERP.GHRMS.APP.App_UI.Forms
{
	public partial class WebForm2 : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			string strDate = "";
			DateTime answer;
			try
			{
				strDate = "01/01/2012";
				answer = Convert.ToDateTime(strDate);
			}
			catch (Exception e2)
			{ }
			try
			{
				strDate = "01/01/2555";
				answer = Convert.ToDateTime(strDate);
			}
			catch (Exception e2)
			{ }
			try
			{
				strDate = "01/01/2555";
				answer = Convert.ToDateTime(strDate, new CultureInfo("th-TH"));
			}
			catch (Exception e2)
			{ } 
			try
			{
				strDate = "01/01/2555";
			
				string year = strDate.Split('/')[2];
				string month = strDate.Split('/')[1];
				string day = strDate.Split('/')[0];
				DateTime.TryParseExact(strDate, "d/M/yyyy", CultureInfo.CurrentCulture, DateTimeStyles.None, out answer);
			}
			catch (Exception e2)
			{ } 

		}
	}
}